#include <iostream>
#include "cppTutorPointerToMembers.h"

// log framework
#include "cppTutorLog.h"
extern CcppTutorLog Log;

using namespace std;

CcppTutorPointerToMembers :: CcppTutorPointerToMembers () : m_nValue (100), m_nValue1 (200){
    Log << "ENTER : CcppTutorPointerToMembers :: CcppTutorPointerToMembers" << endl;
    Log << "EXIT  : CcppTutorPointerToMembers :: CcppTutorPointerToMembers" << endl;
}

CcppTutorPointerToMembers :: ~CcppTutorPointerToMembers () {
    Log << "ENTER : CcppTutorPointerToMembers :: ~CcppTutorPointerToMembers" << endl;
    Log << "EXIT  : CcppTutorPointerToMembers :: ~CcppTutorPointerToMembers" << endl;
}

void CcppTutorPointerToMembers :: m_Print () {
    Log << "ENTER : CcppTutorPointerToMembers :: m_Print" << endl;
    cout << "m_nValue  : " << m_nValue  << endl;
    cout << "m_nValue1 : " << m_nValue1 << endl;
    Log << "EXIT  : CcppTutorPointerToMembers :: m_Print" << endl;
}

void CcppTutorPointerToMembers :: m_Speak () {
    Log << "ENTER : CcppTutorPointerToMembers :: m_Speak" << endl;
    cout << "called from function pointer" << endl;
    Log << "EXIT  : CcppTutorPointerToMembers :: m_Speak" << endl;
}